<?php

namespace App\Http\ViewComposers;
use Illuminate\View\View;
use App\Http\Controllers\Common\CommonController;
use App\Model\Settings;

class SettingsComposer
{


    /**
     * 绑定数据到视图.
     *
     * @param View $view
     * @return void
     */
    public function compose(View $view)
    {
        $common = new CommonController;
        $set = Settings::first();
        $view->with('HomeTitle', $set->shop_title);
        $view->with('HomeLogo', $common->downloadFile($set->home_logo));
        $view->with('pic1', $common->downloadFile($set->pic1));
        $view->with('pic2', $common->downloadFile($set->pic2));
        $view->with('pic3', $common->downloadFile($set->pic3));
        $view->with('pic4', $common->downloadFile($set->pic4));
        $view->with('pic5', $common->downloadFile($set->pic5));


    }
}
